package com.china08.yxyapi.repository.mg.scoreport;

import java.util.List;

import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.scoreport.Exam;

public interface ExamRepository extends MongoRepository<Exam, String> {

    List<Exam> findByIdIn(List<String> idLst);

    List<Exam> findByExamId(String examId);

    Exam findByExamIdAndClassId(String examId, String classLst);

    Exam findById(String examId);

    List<Exam> findByTeacherIdAndClassIdOrderByCreatedDateDesc(String teacherId, String classId);

    List<Exam> findByTeacherIdAndClassIdOrderByExamDateDesc(String teacherId, String classId);

    List<Exam> findByClassIdInAndExamDateAndSubjectAndTotalScore(List<String> classLst, Integer examDate,
            String subject, Integer totalScore);

    List<Exam> findByName(String name);

    List<Exam> findByTeacherIdAndClassIdOrderByExamDateDescCreatedDateDesc(String teacherId, String classId);

	List<Exam> findByNameAndSchoolId(String name, String schoolId);

    List<Exam> findByNameAndSchoolIdAndTeacherId(String name, String schoolId,
            String userId);

	List<Exam> findByTeacherIdAndClassIdAndSubjectOrderByExamDateDescCreatedDateDesc(String teacherId, String classId,
			String subject);

	List<Exam> findByTeacherIdAndClassIdAndSubjectAndStatusNotOrderByExamDateDescCreatedDateDesc(String teacherId,
			String classId, String subject, int i);
}
